3.85 \(\int \frac {(a+b x) (A+B x)}{x} \, dx\)

Optimal. Leaf size=24 \[ x (a B+A b)+a A \log (x)+\frac {1}{2} b B x^2 \]

[Out]

(A*b+B*a)*x+1/2*b*B*x^2+a*A*ln(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {76} \[ x (a B+A b)+a A \log (x)+\frac {1}{2} b B x^2 \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x)*(A + B*x))/x,x]

[Out]

(A*b + a*B)*x + (b*B*x^2)/2 + a*A*Log[x]

Rule 76

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && N
eQ[b*e + a*f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && Rational
Q[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \frac {(a+b x) (A+B x)}{x} \, dx &=\int \left (A b+a B+\frac {a A}{x}+b B x\right ) \, dx\\ &=(A b+a B) x+\frac {1}{2} b B x^2+a A \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 24, normalized size = 1.00 \[ x (a B+A b)+a A \log (x)+\frac {1}{2} b B x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)*(A + B*x))/x,x]

[Out]

(A*b + a*B)*x + (b*B*x^2)/2 + a*A*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 22, normalized size = 0.92 \[ \frac {1}{2} \, B b x^{2} + A a \log \relax (x) + {\left (B a + A b\right )} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A)/x,x, algorithm="fricas")

[Out]

1/2*B*b*x^2 + A*a*log(x) + (B*a + A*b)*x

________________________________________________________________________________________

giac [A]  time = 1.28, size = 22, normalized size = 0.92 \[ \frac {1}{2} \, B b x^{2} + B a x + A b x + A a \log \left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A)/x,x, algorithm="giac")

[Out]

1/2*B*b*x^2 + B*a*x + A*b*x + A*a*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 22, normalized size = 0.92 \[ \frac {B b \,x^{2}}{2}+A a \ln \relax (x )+A b x +B a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*(B*x+A)/x,x)

[Out]

1/2*b*B*x^2+A*b*x+B*a*x+a*A*ln(x)

________________________________________________________________________________________

maxima [A]  time = 1.10, size = 22, normalized size = 0.92 \[ \frac {1}{2} \, B b x^{2} + A a \log \relax (x) + {\left (B a + A b\right )} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A)/x,x, algorithm="maxima")

[Out]

1/2*B*b*x^2 + A*a*log(x) + (B*a + A*b)*x

________________________________________________________________________________________

mupad [B]  time = 0.29, size = 22, normalized size = 0.92 \[ x\,\left (A\,b+B\,a\right )+\frac {B\,b\,x^2}{2}+A\,a\,\ln \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x))/x,x)

[Out]

x*(A*b + B*a) + (B*b*x^2)/2 + A*a*log(x)

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 22, normalized size = 0.92 \[ A a \log {\relax (x )} + \frac {B b x^{2}}{2} + x \left (A b + B a\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A)/x,x)

[Out]

A*a*log(x) + B*b*x**2/2 + x*(A*b + B*a)

________________________________________________________________________________________